<{include file="../public/header.html"}>
<style>
    .menu-access{
        background:#cccccc;
    }
    .btn-follow{
        follow:left;
    }
    .search-bar{
        margin-right: 50px;
    }
    .input-group{
        width:330px;
    }
    #keyword{
        width:160px;
    }
    .search-btn{
        follow:right;
        width:60px;
    }
</style>
<div class="container-fluid">
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-toolbar clearfix">
                    <form class="pull-right search-bar" method="get" action="" role="form">
                        <div class="input-group">

                            <div class="col-xs-4">
                                <select class="form-control" id="example-select" name="search_field" size="1">
                                    <option value="">选择</option>
                                    <option value="title" <{if $smarty.get.search_field == 'title'}>selected="selected"<{/if}>>标题</option>
                                    <option value="article_id" <{if $smarty.get.search_field == 'article_id'}>selected="selected"<{/if}>>编号</option>
                                </select>
                            </div>
                            <span>
                            <input type="text" class="form-control" value="<{$keyword}>" id ="keyword" name="keyword" placeholder="请输入名称">
                            <button type="submit" class="btn btn-primary search-btn" target-form="add-form">确 定</button>
                            </span>
                        </div>

                    </form>
                    <div class="toolbar-btn-action">
                        <a class="btn btn-primary m-r-5" href="#!"><i class="mdi mdi-plus"></i> 新增</a>
                        <a class="btn btn-success m-r-5" href="#!"><i class="mdi mdi-check"></i> 启用</a>
                        <a class="btn btn-warning m-r-5" href="#!"><i class="mdi mdi-block-helper"></i> 禁用</a>
                        <a class="btn btn-danger" href="#!"><i class="mdi mdi-window-close"></i> 删除</a>
                    </div>
                </div>
                <div class="card-body">

                    <div class="table-responsive">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th>
                                    <label class="lyear-checkbox checkbox-primary">
                                        <input type="checkbox" id="check-all"><span></span>
                                    </label>
                                </th>
                                <th>编号</th>
                                <th>标题</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <{foreach from=$list item=$row}>
                            <tr>
                                <td>
                                    <label class="lyear-checkbox checkbox-primary">
                                        <input type="checkbox" name="ids[]" value="<{$row['article_id']}>"><span></span>
                                    </label>
                                </td>
                                <td><{$row['article_id']}></td>
                                <td><{$row['title']}></td>
                                <td><font class="text-success"><{$row['sttus_name']}></font></td>
                                <td>
                                    <div class="btn-group">
                                        <a class="btn btn-xs btn-default" href="/backend/article/edit?article_id=<{$row['article_id']}>" title="编辑" data-toggle="tooltip"><i class="mdi mdi-pencil"></i></a>
                                        <a class="btn btn-xs btn-default" href="javascript:Delete(<{$row['article_id']}>)" title="删除" data-toggle="tooltip"><i class="mdi mdi-window-close"></i></a>
                                    </div>
                                </td>
                            </tr>
                             <{/foreach}>
                            </tbody>
                        </table>
                    </div>
                    <link href="/backend/css/paginator.css" rel="stylesheet">
                    <div class="clearfix"></div>
                    <div class="page">
                        <ul class="pageMenu clearfix">
                        <{$pageBar}>
                        </ul>
                    </div>
                    <div class="clearfix"></div>

                </div>
            </div>
        </div>

    </div>

</div>
<script>
    function Delete(id){
        console.info(id);
    }

</script>

<{include file="../public/footer.html"}>